<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>元素选择器测试</title>
		<link rel="stylesheet" type="text/css" href="css/txt.css" />
		<script type="text/javascript" src="js/jquery.js">
		</script>
	</head>

	<body>
		<div>蒋正午</div>
		<span>陈松</span>
		<div>瑞丰</div>
		<div>www.mldn.cn</div>
	</body>

	<script type="text/javascript">
		$(function() {
			$("div,span").attr("class", "txt");
		});
	</script>

</html>